package com.hyjx.framework.component.codetable;

import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;

/**
 * 码表类别服务接口
 */
public interface CodetableService {

    /**
     * 查询信息列表
     *
     * @return
     */
    public String queryList(CodetableModel model);

    /**
     * 添加信息
     *
     * @param model
     * @throws SQLException
     */
    public boolean add(CodetableModel model) throws SQLException;

    /**
     * 根据ID查询信息
     */
    public CodetableModel getInfoById(CodetableModel model);

    /**
     * 修改信息
     */
    public int edit(CodetableModel model);

    /**
     * 删除信息
     *
     * @param id
     */
    public int delete(CodetableModel model);

    /**
     * 查询类别列表的json串
     *
     * @param model
     * @return
     */
    public String queryManagerList(CodeTableManagerModel model);

    /**
     * 下拉树所需数据查询
     *
     * @param codetable
     * @param parentcode
     * @param resp
     * @return
     */
    public String dealComboTree(String codetable, String parentcode, HttpServletResponse resp);

    /**
     * 根据参数查询码表数据
     *
     * @param codetable
     * @param parentcode
     * @param resp
     * @return
     */
    public String deal(String codetable, String parentcode, HttpServletResponse resp, String pinyin);
}
